#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
    //这个进程就是bash的子进程，直接替换
   
    char* const _argv[]={"ls","-l","-a",NULL};
    execvp("ls",_argv);
    perror("execvp fail");


    //char* const _argv[]={"ls","-l","-a",NULL};
    //execv("/usr/bin/ls",_argv);
    //perror("execv fail");

   // execlp("ls","ls","-l","-a",NULL);       //两个ls不冲突
   // perror("execpl fail");


    //execl("/usr/bin/ls","ls","-l","-a",NULL);
    //perror("execl fail");
    return 0;
}
